<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
    
    <head>
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
        </script>
        <script>
            dojo.require("dijit.form.Form");
            dojo.require("dijit.form.Button");
            dojo.require("dijit.form.ValidationTextBox");
            dojo.require("dijit.form.DateTextBox");
        </script>
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css"
        />
    </head>
    
    <body class=" claro ">
        <div dojoType="dijit.form.Form" id="myForm" jsId="myForm" encType="multipart/form-data"
        action="" method="">
            <script type="dojo/method" event="onReset">
                return confirm('Press OK to reset widget values');
            </script>
            <script type="dojo/method" event="onSubmit">
                if (this.validate()) {
                    return confirm('Form is valid, press OK to submit');
                } else {
                    alert('Form contains invalid data.  Please correct first');
                    return false;
                }
                return true;
            </script>
            <table style="border: 1px solid #9f9f9f;" cellspacing="10">
                <tr>
                    <td>
                        <label for="name">
                            Name:
                    </td>
                    <td>
                        <input type="text" id="name" name="name" required="true" dojoType="dijit.form.ValidationTextBox"
                        />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="dob">
                            Date of birth:
                    </td>
                    <td>
                        <input type="text" id="dob" name="dob" dojoType="dijit.form.DateTextBox"
                        />
                    </td>
                </tr>
            </table>
            <button dojoType="dijit.form.Button" type=button onClick="console.log(myForm.getValues())">
                Get Values from form!
            </button>
            <button dojoType="dijit.form.Button" type="submit" name="submitButton"
            value="Submit">
                Submit
            </button>
            <button dojoType="dijit.form.Button" type="reset">
                Reset
            </button>
        </div>
        <!-- NOTE: the following script tag is not intended for usage in real
        world!! it is part of the CodeGlass and you should just remove it when
        you use the code -->
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                if (document.pub) {
                    document.pub();
                }
            });
        </script>
    </body>

</html>